﻿using Factory;
using IDAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class B_ShoppingCart : IShoppingCart
    {
        public void Add(ShoppingCart item)
        {
            CreateFactory.GetShoppingCart().Add(item);
        }

        public void Delete(int id)
        {
            CreateFactory.GetShoppingCart().Delete(id);
        }

        public ShoppingCart FindById(int id)
        {
            return CreateFactory.GetShoppingCart().FindById(id);
        }

        public List<ShoppingCart> GetAll()
        {
            return CreateFactory.GetShoppingCart().GetAll();
        }

        public void Updata(int id, ShoppingCart item)
        {
            CreateFactory.GetShoppingCart().Updata(id, item);
        }
    }
}
